<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/common/taglibs.jsp"%>
<%@include file="/common/admin_common.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>分类管理</title>
	</head>

	<body style="background-image: none;">

		<div class="content-box">
			<!-- Start Content Box -->
			<div class="content-box-header">
				<h3>
					分类管理
				</h3>
				<ul class="content-box-tabs">
					<li>
						<a href="#tab1" class="default-tab">大分类管理</a>
					</li>
					<!-- href must be unique and match the id of target div -->
					<li>
						<a href="#tab2">小分类管理</a>
					</li>
				</ul>
				<div class="clear"></div>
			</div>
			<!-- End .content-box-header -->
			<div class="content-box-content">
				<div class="tab-content default-tab" id="tab1">
					<s:action name="getArticleType" namespace="/admin"></s:action>
					<!-- This is the target div. id must match the href of this div's tab -->
					<div class="notification attention png_bg">
						<a href="#" class="close"><img
								src="${ctx}/images/icons/cross_grey_small.png"
								title="Close this notification" alt="close" /> </a>
						<div>
							<!-- Icons -->
							<a href="${ctx}/admin/articleTypeCreate.jsp" title="添加">增加资讯大类别</a>
						</div>
					</div>
					<table class="table">
						<thead class="thead">
							<tr>
								<th>
									类别名称&nbsp;&nbsp;&nbsp;&nbsp;|
								</th>
								<th>
									&nbsp;&nbsp;&nbsp;&nbsp;相关操作
								</th>
							</tr>
						</thead>
						<tbody>
							<c:choose>
								<c:when test="${requestScope.ArticleType eq null}">
									<tr>
										<td>
											数据丢失！
										</td>
									</tr>
								</c:when>
								<c:otherwise>
									<c:forEach var="at" items="${requestScope.ArticleType}"
										varStatus="status">
										<tr>
											<td>
												${at.articleTypeName}
											</td>
											<td>
												&nbsp;&nbsp;&nbsp;&nbsp;<a href="${ctx}/admin/deleteType?id=${at.articleTypeId}"
													title="删除"><img src="${ctx }/images/icons/cross.png"
														alt="删除" /> </a>
												&nbsp;&nbsp;<a href="${ctx}/admin/getType?id=${at.articleTypeId}"
													title="修改"><img
														src="${ctx }/images/icons/hammer_screwdriver.png" alt="修改" />
												</a>
											</td>
										</tr>
									</c:forEach>
								</c:otherwise>
							</c:choose>
						</tbody>
					</table>
				</div>
				<!-- End #tab1 -->
				<div class="tab-content" id="tab2">
					<s:action name="getArticleStyle" namespace="/admin"></s:action>
					<!-- This is the target div. id must match the href of this div's tab -->
					<div class="notification attention png_bg">
						<a href="#" class="close"><img
								src="${ctx}/images/icons/cross_grey_small.png"
								title="Close this notification" alt="close" /> </a>
						<div>
							<!-- Icons -->
							<a href="${ctx}/admin/articleStyleCreate.jsp" title="添加">增加资讯小类别</a>
						</div>
					</div>
					<table class="table">
						<thead class="thead">
							<tr>
								<th>
									类别名称&nbsp;&nbsp;&nbsp;&nbsp;|
								</th>
								<th>
									&nbsp;&nbsp;&nbsp;&nbsp;相关操作
								</th>
							</tr>
						</thead>
						<tbody>
							<c:choose>
								<c:when test="${requestScope.ARTICLESTYLE eq null}">
									<tr>
										<td>
											数据丢失！
										</td>
									</tr>
								</c:when>
								<c:otherwise>
									<c:forEach var="as" items="${requestScope.ARTICLESTYLE}"
										varStatus="status">
										<tr>
											<td>
												${as.articleStyleName}
											</td>
											<td>
												&nbsp;&nbsp;&nbsp;&nbsp;<a href="${ctx}/admin/deleteStyle?id=${as.articleStyleId}"
													title="删除"><img src="${ctx }/images/icons/cross.png"
														alt="删除" /> </a>
												&nbsp;&nbsp;<a href="${ctx}/admin/getStyle?id=${as.articleStyleId}"
													title="修改"><img
														src="${ctx }/images/icons/hammer_screwdriver.png" alt="修改" />
												</a>
											</td>
										</tr>
									</c:forEach>
								</c:otherwise>
							</c:choose>
						</tbody>
					</table>
				</div>
				<!-- End #tab2 -->
			</div>
			<!-- End .content-box-content -->
		</div>
		<!-- End .content-box -->
		<jsp:include page="foot.jsp" flush="true"></jsp:include>
	</body>
</html>
